<?php
/**
* 登陆注册控制
*/
namespace frontend\controller;

use Yii;
use yii\web\Controller;
use yii\filters\AccessControl;
use common\user\User;
use yii\base\Event;
use yii\db\Query;

class IndexController extends Controller
{

	/**
	 * 访问控制
	 */
	public function behaviors()
	{
		return [
			'access' => [
				'class' => AccessControl::className(),
				'only' => ['login', 'signup', 'logout', 'index'],
				'rules' => [
					[
						'allow' => true,
						'actions' => ['login', 'signup', 'index'],
						'roles' => ['?']
					],
					[
						'allow' => true,
						'actions' => ['logout'],
						'roles' => ['@']
					]
				]
			]
		];
	}


	public function actionIndex()
	{
		
	}
	
	/**
	 * 登陆
	 */
	public function actionLogin()
	{	
		return $this->renderPartial('login');
	}


	/**
	 * 注册
	 */
	public function actionSignUp()
	{
		return $this->renderPartial('signup');
	}


	public function actionFindPwd()
	{
		return $this->renderPartial('find-pwd');
	}


	/**
	 * 退出登陆
	 */
	public function actionLogout()
	{
		
	}

}